// 博客管理页面样式
@use '../variables' as *;
.post-list {
    // 示例数据提示样式
    .sample-data-notice {
        margin-bottom: 16px;
        .el-alert__title {
            font-weight: 600;
        }
        .el-alert__description {
            font-size: 14px;
            line-height: 1.5;
        }
    }
    .search-filter-section {
        background: white;
        border-radius: $radius-lg;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: $shadow-md;
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
        .search-box {
            flex: 1;
            min-width: 300px;
             :deep(.el-input__wrapper) {
                border-radius: $radius-md;
                background-color: #f8f9fa;
                border: 1px solid #e1e5e9;
                transition: all 0.3s ease;
                &:hover {
                    border-color: #c0c4cc;
                    background-color: #ffffff;
                }
                &:focus-within {
                    border-color: #409eff;
                    background-color: #ffffff;
                    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
                }
            }
             :deep(.el-input__inner) {
                color: $text-primary;
                font-size: 14px;
                &::placeholder {
                    color: #909399;
                }
            }
        }
        .filter-box {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
             :deep(.el-select) {
                min-width: 120px;
            }
        }
        .action-box {
            margin-left: auto;
        }
    }
    .table-section {
        background: white;
        border-radius: $radius-lg;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: $shadow-md;
        // 骨架屏加载样式
        .table-skeleton {
            width: 100%;
            background: white;
            border-radius: $radius-lg;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            .skeleton-header {
                background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                padding: 16px 24px;
                border-bottom: 2px solid #e9ecef;
                .skeleton-row {
                    display: grid;
                    grid-template-columns: 55px 1fr 120px 100px 180px 100px 280px;
                    gap: 16px;
                    align-items: center;
                    >div {
                        height: 20px;
                        background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                        background-size: 200% 100%;
                        animation: skeleton-loading 1.5s infinite;
                        border-radius: $radius-sm;
                    }
                }
            }
            .skeleton-body {
                .skeleton-row {
                    display: grid;
                    grid-template-columns: 55px 1fr 120px 100px 180px 100px 280px;
                    gap: 16px;
                    align-items: center;
                    padding: 20px 24px;
                    border-bottom: 1px solid #f1f3f4;
                    transition: all 0.3s ease;
                    &:hover {
                        background-color: rgba(102, 126, 234, 0.02);
                    }
                    &:last-child {
                        border-bottom: none;
                    }
                    .skeleton-checkbox {
                        width: 16px;
                        height: 16px;
                        background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                        background-size: 200% 100%;
                        animation: skeleton-loading 1.5s infinite;
                        border-radius: 3px;
                    }
                    .skeleton-content {
                        display: flex;
                        flex-direction: column;
                        gap: 8px;
                        .skeleton-title {
                            height: 18px;
                            width: 80%;
                            background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                            background-size: 200% 100%;
                            animation: skeleton-loading 1.5s infinite;
                            border-radius: $radius-sm;
                        }
                        .skeleton-tags {
                            display: flex;
                            gap: 6px;
                            .skeleton-tag {
                                width: 40px;
                                height: 16px;
                                background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                                background-size: 200% 100%;
                                animation: skeleton-loading 1.5s infinite;
                                border-radius: $radius-sm;
                                &:nth-child(2) {
                                    width: 50px;
                                }
                            }
                        }
                    }
                    .skeleton-category,
                    .skeleton-status {
                        height: 24px;
                        width: 60px;
                        background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                        background-size: 200% 100%;
                        animation: skeleton-loading 1.5s infinite;
                        border-radius: $radius-sm;
                    }
                    .skeleton-time {
                        height: 16px;
                        width: 100px;
                        background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                        background-size: 200% 100%;
                        animation: skeleton-loading 1.5s infinite;
                        border-radius: $radius-sm;
                    }
                    .skeleton-views {
                        height: 20px;
                        width: 40px;
                        background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                        background-size: 200% 100%;
                        animation: skeleton-loading 1.5s infinite;
                        border-radius: $radius-sm;
                    }
                    .skeleton-actions {
                        display: flex;
                        gap: 8px;
                        .skeleton-btn {
                            width: 50px;
                            height: 28px;
                            background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
                            background-size: 200% 100%;
                            animation: skeleton-loading 1.5s infinite;
                            border-radius: $radius-sm;
                            &:nth-child(2) {
                                width: 45px;
                            }
                            &:nth-child(3) {
                                width: 40px;
                            }
                        }
                    }
                }
            }
        }
        // 骨架屏动画
        @keyframes skeleton-loading {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
        // 空状态样式
        .empty-state {
            padding: 60px 20px;
            text-align: center;
        }
        .post-title {
            .title-text {
                display: block;
                font-weight: $font-medium;
                color: $text-primary;
                margin-bottom: 8px;
            }
            .post-tags {
                display: flex;
                gap: 4px;
                flex-wrap: wrap;
                .tag-item {
                    font-size: 12px;
                }
            }
        }
         :deep(.el-table) {
            border-radius: $radius-lg;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            .el-table__header {
                th {
                    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                    color: $text-primary;
                    font-weight: $font-semibold;
                    border-bottom: 2px solid #e9ecef;
                    padding: 16px 12px;
                }
            }
            .el-table__row {
                transition: all $transition-normal;
                &:hover {
                    background-color: rgba(102, 126, 234, 0.05);
                    transform: translateY(-1px);
                    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                }
                td {
                    padding: 16px 12px;
                    border-bottom: 1px solid #f1f3f4;
                }
            }
            .el-table__expand-icon {
                font-size: 14px;
            }
            .el-table__cell:last-child {
                padding-right: 16px;
            }
        }
        // 操作按钮样式
        .action-buttons {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
            .action-btn {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                padding: 6px 12px;
                border-radius: $radius-md;
                transition: all 0.3s ease;
                font-size: 12px;
                &:hover {
                    transform: translateY(-1px);
                    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
                }
                .el-icon {
                    font-size: 14px;
                }
            }
            .more-btn {
                &:hover {
                    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
                    border-color: transparent;
                    color: white;
                }
            }
        }
        // 浏览量样式
        .view-count {
            display: inline-block;
            padding: 4px 8px;
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            border-radius: $radius-sm;
            font-weight: $font-medium;
            color: #1976d2;
            font-size: 12px;
        }
        // 下拉菜单样式
         :deep(.el-dropdown-menu) {
            border-radius: $radius-md;
            box-shadow: $shadow-lg;
            border: none;
            padding: 8px 0;
            .el-dropdown-item {
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 10px 16px;
                transition: all 0.3s ease;
                &:hover {
                    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                    color: $primary-color;
                }
                .el-icon {
                    font-size: 14px;
                }
            }
        }
    }
    .pagination-section {
        display: flex;
        justify-content: center;
        background: white;
        border-radius: $radius-lg;
        padding: 20px;
        box-shadow: $shadow-md;
    }
    .batch-actions {
        position: fixed;
        bottom: 24px;
        right: 24px;
        background: white;
        border-radius: $radius-lg;
        padding: 16px;
        box-shadow: $shadow-lg;
        display: flex;
        gap: 12px;
        z-index: 1000;
    }
}

// 响应式设计
@media (max-width: 768px) {
    .post-list {
        .search-filter-section {
            flex-direction: column;
            align-items: stretch;
            .search-box {
                min-width: auto;
            }
            .filter-box {
                justify-content: space-between;
            }
            .action-box {
                margin-left: 0;
            }
        }
        .action-buttons {
            flex-direction: column;
            gap: 6px;
            .action-btn {
                width: 100%;
                justify-content: center;
            }
        }
        .batch-actions {
            bottom: 16px;
            right: 16px;
            left: 16px;
            justify-content: center;
        }
        // 移动端骨架屏适配
        .table-skeleton {
            .skeleton-header,
            .skeleton-body {
                .skeleton-row {
                    grid-template-columns: 40px 1fr 80px 60px 100px 60px 120px;
                    gap: 8px;
                    padding: 12px 16px;
                    .skeleton-actions {
                        flex-direction: column;
                        gap: 4px;
                        .skeleton-btn {
                            width: 100%;
                            height: 24px;
                        }
                    }
                }
            }
        }
    }
}